
def parentheses_matching(str):
    list = []
    dict = {
        "}": "{",
        "]": "[",
        ")": "(",
    }
    for i in str:
        if i in {"[","(","{"}:
            list.append(i)
        else:
            if len(list) == 0:
                return False
            elif list[-1] == dict[i]:
                list.pop()
            else:
                return False
    if len(list) == 0:
        return True
    else:
        return False

print(parentheses_matching("{{{}()[]}}"))


